/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 castle_gate_animation.cpp

	$Header: /heroes4/castle_gate_animation.cpp $

	$NoKeywords: $

 ************************************************************************/
#include "precompiled.h"
#include "open_gate_animation.h"

#include "battlefield.h"
// --------------------------------------------------------------
// open gate animation object
// --------------------------------------------------------------
t_open_gate_animation::t_open_gate_animation( t_combat_creature&		creature,
											  t_combat_path&			path,
											  t_map_point_2d const&		point, 
											  t_combat_creature_handler handler )
					 : t_counted_animation( creature.get_battlefield() ),
					   m_creature( creature ), m_path( path ), m_target( point ),
					   m_end_handler( handler )
{
}

// --------------------------------------------------------------
// open gate animation object
// --------------------------------------------------------------
void t_open_gate_animation::operator()()
{
	m_battlefield.begin_move( m_creature, m_path, m_target, m_end_handler, get_action_message() );
	animation_ended();
}
